import request from "@/plugins/axios";
// 商品列表
export function listApi(data) {
  return request({
    url: "/shop/goods/index",
    method: "post",
    data,
  });
}
//  商品添加
export function addApi(data) {
  return request({
    url: "/shop/goods/create",
    method: "post",
    data,
  });
}
//  商品修改
export function saveApi(data) {
  return request({
    url: "/shop/goods/save",
    method: "post",
    data,
  });
}
// 商品上下架
export function stateApi(data) {
  return request({
    url: "/shop/goods/state",
    method: "post",
    data,
  });
}
//  删除
export function delApi(data) {
  return request({
    url: "/shop/goods/delete",
    method: "post",
    data,
  });
}
//  删除恢复
export function unDelApi(data) {
  return request({
    url: "/shop/goods/unDel",
    method: "post",
    data,
  });
}
//
// 商品回收站
export function recycleApi(data) {
  return request({
    url: "/shop/goods/recycle",
    method: "post",
    data,
  });
}
// 增加库存
export function addGoodsApi(data) {
  return request({
    url: "/shop/goods/stock",
    method: "post",
    data,
  });
}
// 商品库存记录
export function goodsLogApi(data) {
  return request({
    url: "/shop/goods/stocks",
    method: "post",
    data,
  });
}
//删除商品库存记录
export function delGoodsLogApi(data) {
  return request({
    url: "/shop/goods/stockDel",
    method: "post",
    data,
  });
}
//复制
export function copyApi(data) {
  return request({
    url: "/shop/goods/copy",
    method: "post",
    data,
  });
}
//复制
export function skuApi(data) {
  return request({
    url: "/shop/goods/srchSKU",
    method: "post",
    data,
  });
}
//复制
export function importApi(data) {
  return request({
    url: "/shop/goods/import",
    method: "post",
    data,
  });
}
